﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VswService_V7.Sok;

namespace VswService_V7.ClientCommand
{
    public class CommandContent
    {
        //command identity
        public string commandId;
        //command session
        public VswSession session;
        //command received
        public DateTime time;
        //command parameters
        public string[] body;

        public CommandContent()
        {

        }

        //commandcontent for operator client
        //key; Defined  Undefined
        //para[0]; command id
        //para[1]; command time
        //para[2]-[n] command parameter 1-n
        public CommandContent(VswSession session, string[] parameter)
        {
			
            this.session = session;
            commandId = parameter[0];
            time = Convert.ToDateTime(parameter[1]);
            int length = parameter.Length - 2;
            if (length > 0)
            {
                body = new string[length];
                Array.Copy(parameter, 2, body, 0, length);
				string aa = body[0];
            }

            //this.content = content.Skip(2).Take(5).ToArray();
        }

    }
}
